package com.repair.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.repair.entity.User;
import java.util.List;
import java.util.Map;

public interface UserService extends IService<User> {
    User findByUsername(String username);
    void register(User user);
    String login(String username, String password);
    void updateProfile(User user);
    void changePassword(Long userId, String oldPassword, String newPassword);
    
    // 扩展方法
    long count();
    long countRepairmen();
    List<User> getRepairmen();
    List<Map<String, Object>> getRepairmanLocations();
    void updateUserStatus(Long userId, Integer status);
    
    // 新增方法
    User updateStatus(Long id, Integer status);
    void delete(Long id);
    void toggleUserStatus(Long id);
    void toggleRepairmanStatus(Long id);
    User getByUsername(String username);
    void updatePassword(Long userId, String newPassword);
    void updateRepairmanStatus(Long repairmanId, Integer status);
} 